package br.com.news.service.interfaces;

import java.util.List;

import br.com.news.exception.ServiceException;
import br.com.news.modal.NoticiaBean;

public interface INoticiaService {

	long salvar(NoticiaBean noticiaBean) throws ServiceException;
	
	void atualizar(NoticiaBean noticiaBean) throws ServiceException;
	
	long inserir(NoticiaBean noticiaBean) throws ServiceException;
	
	int deletar(long idNoticia) throws ServiceException;
	
	NoticiaBean findId(long idNoticia) throws ServiceException;
	
	List<NoticiaBean> findAll() throws ServiceException;
	
	/**
	 * Retorna noticias pelo id Categoria
	 * 
	 * @param idCategoria
	 * @return List<NoticiaBean>
	 * @throws ServiceException
	 */
	List<NoticiaBean> findNoticiaByIdCategoria(long idCatogoria) throws ServiceException;
	
	void fechar();
	
	void deleteAllNews() throws ServiceException;
	
	String buscaTextoNoticia(long idNoticia) throws ServiceException;
	
	void sincronizaNoticiasAnteriores(long idNoticia, long idCategoria) throws ServiceException;

	void sincronizaUltimasNoticias(long idNoticia, long idCategoria) throws ServiceException;
	
	NoticiaBean buscaUltimaNoticia(long idCategoria) throws ServiceException;
}
